<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <button onclick="exportFile()">导出到Excel</button>
</body>
<script src="./exportToExcel.js"></script>
<script>
    function exportFile() {
        var tableData = [
            {
                name: "张三",
                brief: "热爱学习，热爱运动，热爱读书",
                gender: "男",
                birthday: "2000-3-9",
            }, {
                name: "李四",
                brief: "温柔善良，品学兼优，人见人爱",
                gender: "女",
                birthday: "2002-9-5",
            }, {
                name: "王五",
                brief: "自律自强，热爱生活，服务群众",
                gender: "男",
                birthday: "2001-5-8",
            }, {
                name: "赵六",
                brief: "每天慢跑十公里，不带喘气儿的",
                gender: "女",
                birthday: "1999-2-8",
            }, {
                name: "周七",
                brief: "喜欢下棋，喜欢游泳，喜欢读书，喜欢音乐",
                gender: "女",
                birthday: "2000-8-9",
            }
        ]

        // toEx.exportToExcel(tableData)
        window.open('https://www.baidu.com')
    }
</script>
</html>